<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.fit.user.dao.GoodMsgDAO"%>
<%@page import="com.fit.user.entity.GoodMsgEntity"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'return_wupin.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
      <%
       String caseID = (String)session.getAttribute("caseID");
       GoodMsgDAO goodMsgDAO = new GoodMsgDAO();
       List<GoodMsgEntity> list = goodMsgDAO.getWuPIn(caseID);
       String[] str = {"物品名称","物品数量","处理物品民警","处理时间"};
     %>
  
  <body>
<table>
 <tr  align="center" class="myrow" bgcolor="#1D639F">
  <c:forEach var="name" items="<%=str %>">
  <td  class="td_boder"  style="color:#ffffff;">${name }</td>
  </c:forEach>
  </tr>
<%
  if(list!=null){
  for(int i =0;i<list.size();i++)
  {
  GoodMsgEntity goodMsgEntity=list.get(i);
  
   
   %>
  <tr >
  <td><%=goodMsgEntity.getGoodName() %></td><td><%=goodMsgEntity.getGoodNum() %></td>
  <form  method="post" action="servlet/ReturnGood">
  <%
  if(goodMsgEntity.getTimeGet()==null){
   %>
  <td><input type="text" name="policeName" /><input type="hidden" name="goodName" value="<%=goodMsgEntity.getGoodName() %>"/></td>
  <td><input type="text" name="return_time" /><input type="hidden" name="caseID" value="<%=caseID %>"/></td>
  <td> <input type="submit" name="提交"></td>
  <%} else{%>
    <td><input type="text" name="policeName" value="<%=goodMsgEntity.getHandGoodsMen() %>" /></td>
  <td><input type="text" name="return_time" value=<%=goodMsgEntity.getTimeGet() %>/></td>
  <%} %>
  </form>
  </tr>

  <%
}
  }
   %>
</table>
  </body>
</html>
